home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 13 - 1997 (partial) / 13.05 May 97 / WebObjects Overview / Hello.java < prev    next >
Encoding:
Text File  |  1997-03-26  |  421 b   |  22 lines  |  [TEXT/R*ch]

  1. // This subclass of Component defines the custom behavior of the Hello 
  2. // page used as a response for the Main page’s action method.  It also 
  3. // declares a visitorName instance variable.
  4.  
  5. import next.util.*;
  6. import next.wo.*;
  7.  
  8. public class Hello extends Component
  9. {
  10.     String visitorName;
  11.  
  12.     public void setVisitorName (String name)
  13.     {
  14.         visitorName = name;
  15.     }
  16.  
  17.     public String visitorName ()
  18.     {
  19.         return visitorName;
  20.     }
  21. }
  22.